import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;


public class fireball implements ActionListener, Collidable
{

	int x;
	int y;
	boolean right;
	BufferedImage fb;
	fireball fiya;


	public fireball(int StartX, int StartY){

		x = StartX;
		y = StartY;
		
		try{

			fb = ImageIO.read(new File("src/daREALZfireball.png"));
			
		}

		catch(IOException e) {

			System.out.println(e.getMessage());
		}
	}

	public Image getImage(){

		return fb;
	}

	
	public int getX(){
		return x;


	}

	public int getY(){
		return y;


	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		x = x + 12;
		
	}

	public void paint(Graphics2D g2d)
	{
		g2d.drawImage(fb, getX(), getY(), null);
	}

	public Rectangle2D.Double shape() {
		
		Rectangle2D.Double rect = new Rectangle2D.Double(x, y, fb.getWidth()-100, fb.getHeight()-100);
		return rect;
		
		
	}
	
}